<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>备注</title>
		<link rel="stylesheet" type="text/css" href="../../plugins/layui/css/layui.css" />
		<link href="../../kitAdmin/css/app.css" rel="stylesheet" type="text/css" />
		<link rel="stylesheet" type="text/css" href="../../plugins/select2/dist/css/select2.min.css"/>
		<style type="text/css">
			.layui-unselect.layui-form-select {
			    display: none;
			}
		</style>
	</head>

	<body>
	
		<div style="margin:10px">
			<div class='layui-inline'>
				<label class='layui-form-label'>跟进状态</label>
				<select style="width:240px" lay-filter="_followSelect" data-link='{:followUp}' id='_followSelect' name='followSelect' class='layui-input'>
					<option value='all' selected="true">请选择</option>
				</select>
			</div>
			<div class='layui-inline'>
				<label class='layui-form-label'>备注</label>
				<textarea class='layui-input' rows="10" cols="20" id="remark" data-link='{:remark}' ></textarea>
			</div>
		</div>
		<script src="../../common/js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../static/js/base.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugins/jsviews/jsviews.js" type="text/javascript"></script>
		<script src="../../plugins/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../plugins/select2/dist/js/select2.min.js" type="text/javascript" charset="utf-8"></script>
	</body>
	<script type="text/javascript">
	var uid = getQueryVariable('uniqueId');//获取url中的数据
	jQuery(document).ready(function() {
		bindSelect();
		bindFormData();
	})
		
	function bindSelect() {
		var fuzerenData = [];
		fuzerenData.unshift({
			id : '正式报课',
			text : '正式报课'
		});
		fuzerenData.unshift({
			id : '不报课',
			text : '不报课'
		});
		$('#_followSelect').select2({
			data : fuzerenData
		});
	}
	
	function bindFormData(){
		if(uid){
			$.ajax({
				url:baseUrl+'/trylistenmanages/getByUid/'+uid,
				type:'get',
				success:function(data){
					entity=data.data;
// 					$.link(true, ".kit-table", entity);
					if (entity.followUp != null) {
						$.link(true, "#_followSelect", entity);
						$('select').select2().change();
					}
						
						$.link(true, "#remark", entity);
//						$('input[name="istrylisten"]').val("是");
				},
				error:function(){
					parent.layer.alert('系统或网络错误！');
				}
			});
		}
	}
	
	var callback_save=function(){
		return $('#_followSelect').val()+"&"+ $('#remark').val();
	}
	
	</script>
</html>
